<?php
/**
*	@author SignpostMarv Martin
*	@package UHU
*/

if(function_exists('headerBySAPI') === false)
{
/**
*	Acts as a wrapper to uhu_headerBySAPI::headerBySAPI
*	@uses uhu_headerBySAPI::headerBySAPI()
*/
	function headerBySAPI()
	{
		$args = func_get_args();
		return call_user_func_array('uhu_headerBySAPI::headerBySAPI',$args);
	}
}
if(function_exists('llXorBase64StringsCorrect') === false)
{
/**
*	 Acts as a wrapper to uhu::llXorBase64StringsCorrect
*	@param string $s1 Base64 encoded string
*	@param string $s2 Base64 encoded string
*	@uses uhu::llXorBase64StringsCorrect()
*	@return string
*/
	function llXorBase64StringsCorrect($s1,$s2)
	{
		return uhu::llXorBase64StringsCorrect($s1,$s2);
	}
}
if(function_exists('is_uuid') === false)
{
/**
*	Acts as a wrapper to uhu::is_uuid
*	@uses uhu::is_uuid()
*	@param string $string the string to check for being a UUID.
*	@return bool TRUE if $string is a UUID, FALSE otherwise
*/
	function is_uuid($string)
	{
		return uhu::is_uuid($string);
	}
}
if(function_exists('llMD5String') === false)
{
/**
*	Acts as a wrapper to uhu::llMD5String
*	@uses uhu::llMD5String()
*	@param string $string The string to hash
*	@param integer $nonce The integer to combine with the string
*	@return string returns an MD5 string.
*/
	function llMD5String($string,$nonce=0)
	{
		return uhu::llMD5String($string,$nonce);
	}
}
if(function_exists('md52uuid') === false)
{
/**
*	Converts an MD5 string to a UUID format
*	@param string $hash the MD5 string to convert
*	@return string|bool returns FALSE if the length of the string is not 32 characters long, otherwise returns a UUID.
*/
	function md52uuid($hash)
	{
		if(strlen($hash) !== 32)
		{
			return false;
		}
		else
		{
			return sprintf('%s-%s-%s-%s-%s',
				substr($hash,0,8),
				substr($hash,8,4),
				substr($hash,12,4),
				substr($hash,16,4),
				substr($hash,20)
			);
		}
	}
}
?>